Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Populating a list at run time
There are two methods you can use on a selection list, combo box, or radio set to set the value list at run time:
ADD-FIRSTandADD-LAST. Each has the same two forms:
Use
ADD-FIRSTto add items to the beginning of the list andADD-LASTto add them to the end. If the object uses the simple List-Items form, in which the actual object values are displayed, then use theitem-listform of the method to add one or more items to the list. If the object uses the List-Item-Pairs form, then use the second form of the method to specify a singlelabelfollowed by the singlevalueit represents.These types of objects have a
DELIMITERattribute to allow you to set a delimiter between items other than the default comma, in case one of the values or labels contains a comma.The objects also support a logical
SORTattribute, which initially is false. If you setSORTto true, then displayed items are sorted by their label. In this case, there is no meaningful difference between usingADD-FIRSTandADD-LAST.The methods return true if the operation succeeded, and false if for any reason it failed.
![]()
To use the
ADD-LASTmethod to add each of the OrderLine field names to the end of the selection list:
- Enter this code to complete the
initSelectionprocedure:
- To display these values in the list when the window is viewed, add a
RUNstatement to the procedure’s main block:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |